<template>
  <div class="suan-fa">
    <el-carousel
      :interval="5000"
      :loop="false"
      indicator-position="outside"
      :autoplay="false"
      arrow="never"
      class="carousel"
    >
      <el-carousel-item v-for="(item, index) in allList" :key="index">
        <div class="top flex justify-between">
          <div class="chart"></div>
          <div class="top-right">
            <div class="status">
              <h3>{{ $store.state.JName + '/' + $store.state.name }}</h3>
              <label :style="getBackColor(status)">状态异常</label>
              <p>换流阀温度数据取最大值,温度预测值超出阈值。</p>
            </div>
            <!--        <div class="analysis">-->
            <!--          <label :style="getBackFXColor()">风险分析</label>-->
            <!--          <p>换流阀温度数据取最大值,温度预测值超出阈值。</p>-->
            <!--        </div>-->
          </div>
        </div>
        <div class="bot">
          <label :style="getBackFXColor()">处理建议</label>
          <p>换流阀温度数据取最大值,温度预测值超出阈值。</p>
        </div>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  name: "SuanFa",
  props: {},
  data() {
    return {
      status: "1",
      allList: [
        "基于历史换流阀温度数据规律的有监督异常诊断算法",
        "基于短时记忆LSTM的阀塔电压数据的趋势预测异常诊断算法",
        "基于阀厅温湿度、进出阀水温、进水流量和换流阀电流的换流阀温度异常检测诊断算法",
      ],
    };
  },
  computed: {
    ...mapState(["name"]),
  },
  created() {
  },
  mounted() {},
  methods: {
    getBackColor(state) {
      return {
        background:
          state == "0" || state == "3"
            ? "#1cbe21"
            : state == "1"
            ? "#ffaa00"
            : state == "2"
            ? "#ff3737"
            : "#1cbe21",
      };
    },
    getBackFXColor() {
      return {
        background: "#6ac144",
      };
    },
  },
};
</script>
<style lang="less">
.suan-fa {
	height: 100%;
	.carousel {
		height: 100% !important;
		width: 100% !important;
		margin: 0 auto;
		.el-carousel__container {
			height: calc(100% - 36px) !important;
			width: 100% !important;
			.top {
				height: calc(100% - 150px);
				.chart {
					flex: 1;
				}
				.top-right {
					width: 300px;
					.status {
						margin-bottom: 10px;
						h3 {
							color: #1da9ed;
							font-size: 16px;
							font-weight: bold;
							line-height: 32px;
						}
					}
				}
			}
			label {
				display: block;
				line-height: 48px;
				text-align: center;
				color: #ffffff;
				font-size: 16px;
				font-weight: bold;
			}
			p {
				color: #ffffff;
				font-size: 16px;
				line-height: 36px;
				height: 147px;
				overflow-y: auto;
				padding: 10px;
				border: 1px solid rgba(255, 255, 255, 0.1);
				border-top: 0;
			}
			.bot {
				display: flex;
				margin-top: 10px;
				height: 90px;
				label {
					width: 150px;
					line-height: 90px;
				}
				p {
					flex: 1;
					height: 90px;
					border: 1px solid rgba(255, 255, 255, 0.1);
					border-left: 0;
				}
			}
		}


		.status {
			height: 100%;
			p {
				height: calc(100% - 82px);
			}
		}
	}
}
</style>
<style scoped lang="less">
.suan-fa {
  height: 100%;

}
</style>
